function toPoint() {
    window.history.back(-1);
}

function editPoint(id) {
    var devCode = document.getElementById("devCode").value;
    var pointName = document.getElementById("pointName").value;


    window.parent.layerAlert("你确定要修改该点位吗？", {
        icon: 3,
        title: "提示",
        btn:["确定","取消"],
        yes:function (){
            $.ajax({
                type: "GET",
                url: "/multipower/point/update",
                data: {
                    id: id,
                    devCode:devCode,
                    pointName:pointName
                },
                success: function (data) {
                    if(data.status==1){
                        window.location.href = "/multipower/point.html";
                        window.parent.layerAlert(data.msg, {
                            icon: 6,
                            title: "提示"
                        });
                    }else{
                        window.parent.layerAlert(data.msg, {
                            icon: 5,
                            title: "提示"
                        });
                    }
                },
                error:function () {
                    window.parent.layerAlert("修改失败", {
                        icon: 5,
                        title: "提示"
                    });
                    return false;
                }
            })
        }
    });
}